<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>四级项目1.1</title>
</head>
<body>
<script>
  var arr = [7, 9, 6, 2, 5, 1, 0, 3, 8, 4];
  var Count = 0;
  for (var i = 0; i < arr.length; i++) {
    if (arr[i] % 2 !== 0) {
      Count++;
    }
  }
  var rate = Count / arr.length;
  console.log(rate);
</script>

</body>
</html>
